package demo.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import demo.dao.IAdminDao;
import demo.model.AdminDTO;

@Service
public class AdminServiceImpl implements IAdminService {
	
	@Resource
	private IAdminDao dao;

	@Override
	public int editPass(AdminDTO dto) {
		int n = dao.oldPassIsYes(dto);
		if(n>0) {//旧密码是正确的
			return dao.editPass(dto);
		}
		return 0;
	}

}
